import 'dart:async';

import 'package:flutter/material.dart';
import 'package:fristflutter/src/framework/app_start_action.dart';
import 'package:fristflutter/src/framework/app_start_scope.dart';

mixin CusStarter implements AppStartAction {
  Widget get app;

  void run(List<String> args) {
    runZonedGuarded(_runApp, onGlobalError);
  }

  void _runApp() {
    runApp(
      AppStartScope(appStartAction: this, child: app)
    );
  }

  void onGlobalError(Object error, StackTrace stack);
}